//
//  IndentTextField.m
//  YoucApp
//
//  Created by 21CN Vgo on 12/10/12.
//
//

#import "IndentTextField.h"

@implementation IndentTextField

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

- (CGRect)editingRectForBounds:(CGRect)bounds
{
	bounds = [super textRectForBounds:bounds];
	
	bounds.origin.x += 5;
	bounds.size.width -= 5;
	
	return bounds;
}

- (CGRect)textRectForBounds:(CGRect)bounds
{
	return [self editingRectForBounds:bounds];
}

- (CGRect)placeholderRectForBounds:(CGRect)bounds
{
	return [self textRectForBounds:bounds];
}

@end
